#coding:utf-8
from django.conf.urls import patterns


urlpatterns = patterns('lovewith.card.views',
    (r'^$', 'card.card_home'),
    (r'^setting/$', 'card.card_setting'),
    (r'^home/(?P<card_id>\d+)?/', 'card.show_card'),


    #开发环境下提供flash跨域使用
    (r'^crossdomain.xml$', 'card.crossdomain'),

    #上传
    (r'^ajax/p/upload/$', 'ajax.upload_image'),
    #更新请柬信息
    (r'^ajax/p/update_card_data/', 'ajax.update_card'),
    #更新请柬标题
    (r'^ajax/p/update_card_title/', 'ajax.update_card_title'),
    #更新内容
    (r'^ajax/p/update_post/', 'ajax.update_post'),
    #删除内容
    (r'^ajax/g/delete_post/', 'ajax.delete_post'),
    #更新邀请人
    (r'^ajax/p/update_invite/', 'ajax.update_invite'),
    #删除邀请人
    (r'^ajax/g/delete_invite/', 'ajax.delete_inviter'),
)

#跨域用
urlpatterns += patterns('',
    (r'^u/auth/sina', 'lovewith.account.views.auth.auth_by_weibo'),
    (r'^u/auth/qq', 'lovewith.account.views.auth.auth_by_qq'),
    (r'^u/ajax/checkuser', 'lovewith.account.views.ajax.check_username'),
    (r'^u/ajax/join', 'lovewith.account.views.ajax.join'),
    (r'^site/ajax/mail', 'lovewith.website.views.ajax.send_mail'),
)








